home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Prog / M / LSC213.cpt / MenuMgr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1987-09-26  |  1.3 KB  |  72 lines  |  [TEXT/KAHL]

  1.  
  2. /*
  3.  *  MenuMgr.h
  4.  *
  5.  *  Copyright (c) 1986, 1987 THINK Technologies, Inc.
  6.  *  These interfaces are based on information copyrighted
  7.  *  by Apple Computer, Inc., 1985, 1986, 1987.
  8.  *
  9.  */
  10.  
  11. #ifndef    _MenuMgr_
  12. #define _MenuMgr_
  13.     
  14. #ifndef    _MacTypes_
  15. #include "MacTypes.h"
  16. #endif
  17.  
  18. #define maxItem        31
  19.  
  20. /* special chars */
  21. enum {
  22.     noMark,
  23.     commandMark = 0x11,
  24.     checkMark,
  25.     diamondMark,
  26.     appleMark
  27. };
  28.  
  29. /*  menu defproc messages  */
  30. enum { mDrawMsg, mChooseMsg, mSizeMsg };
  31.  
  32. /*  MDEF id  */
  33. #define textMenuProc    0
  34.  
  35. /*  hierarchical and pop-up menus  */
  36. #define hMenuCmd        0x1B
  37. #define hierMenu        -1
  38. #define mPopUpMsg        4
  39.  
  40.  
  41. typedef struct
  42.     {
  43.     int        menuID;
  44.     int        menuWidth;
  45.     int        menuHeight;
  46.     Handle     menuProc;
  47.     long    enableFlags; 
  48.     Str255    menuData;
  49.     } MenuInfo,* MenuPtr, ** MenuHandle;
  50.  
  51.  
  52. /*  functions returning non-integral values  */
  53. pascal MenuHandle NewMenu();
  54. pascal MenuHandle GetMenu();
  55. pascal Handle GetNewMBar();
  56. pascal Handle GetMenuBar();
  57. pascal MenuHandle GetMHandle();
  58.  
  59. /*  low-memory globals  */
  60. extern int TopMenuItem : 0xA0A;
  61. extern int AtMenuBottom : 0xA0C;
  62. extern Handle MenuList : 0xA1C;
  63. extern int MBarEnable : 0xA20;
  64. extern int MenuFlash : 0xA24;
  65. extern int TheMenu : 0xA26;
  66. extern ProcPtr MBarHook : 0xA2C;
  67. extern ProcPtr MenuHook : 0xA30;
  68. extern long MenuDisable : 0xB54;
  69. extern int MBarHeight : 0xBAA;
  70.  
  71.  
  72. #endif _MenuMgr_